package com.ktwlsoft.archivemanage.domain.business.repositoryService.businessInspect;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspect.InspectSubject;
import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspect.SelfInspectSubject;
import com.ktwlsoft.archivemanage.domain.dao.repository.businessInspect.SelfInspectSubjectMapper;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * self_inspect_subject--自查--业务指导题目-业务层实现类
 *
 * @author zhuhe
 * @date 2023/06/25
 */
@Service
public class SelfInspectSubjectRepositoryService extends ServiceImpl<SelfInspectSubjectMapper, SelfInspectSubject> {



    /**
     * 查询分页 on 2019-11-12 15:00:45
     * @param pn 第几页
     * @param pageSize 每页多少条
     * @param inspectSubject inspectSubject
     * @return PageInfo<SelfInspectSubject>
     */
    public PageInfo<SelfInspectSubject> findPage(int pn, int pageSize, SelfInspectSubject inspectSubject) {
        PageHelper.startPage(pn,pageSize);
        PageInfo<SelfInspectSubject> pageInfo = new PageInfo<SelfInspectSubject>(getBaseMapper().findList(inspectSubject));
        return pageInfo;
    }

    /**
     * 查询集合 on 2019-11-12 15:00:45
     * @param inspectSubject inspectSubject
     * @return List<SelfInspectSubject>
     */
    public List<SelfInspectSubject> findList(SelfInspectSubject inspectSubject) {
        return getBaseMapper().findList(inspectSubject);
    }

    /**
     * 根据ID查询信息 on 2019-11-12 15:00:45
     * @param id	主键
     * @return SelfInspectSubject
     */
    public SelfInspectSubject getById(Long id){
        return getBaseMapper().getById(id);
    }

    /**
     * 根据业务检查id查询信息 on 2019-11-12 15:00:45
     * @param inspectId	业务检查id
     * @return SelfInspectSubject
     */
    public List<SelfInspectSubject> getByInspectId(Long inspectId){
        return getBaseMapper().getByInspectId(inspectId);
    }

    /**
     * 新增 on 2019-11-12 15:00:45
     * @param inspectSubject inspectSubject
     * @return int
     */
    public int insert(SelfInspectSubject inspectSubject){
        return getBaseMapper().insert(inspectSubject);
    }

    /**
     * 批量插入 on 2019-04-23 10:57:02
     * @param list list
     * @return int
     */
    public int manyInsert(List<SelfInspectSubject> list){
        return getBaseMapper().manyInsert(list);
    }

    /**
     * 修改 on 2019-11-12 15:00:45
     * @param inspectSubject inspectSubject
     * @return int
     */
    public int update(SelfInspectSubject inspectSubject){
        return getBaseMapper().update(inspectSubject);
    }

    /**
     * 根据id集合批量删除信息 on 2019-11-12 15:00:45
     * @param guidanceSubjectArr	主键编号集合
     * @return int
     */
    public int deleteByIds(List<Long> guidanceSubjectArr){
        return getBaseMapper().deleteByIds(guidanceSubjectArr);
    }

    /**
     * 根据id删除信息 on 2019-11-12 15:00:45
     * @param id id
     * @return int
     */
    public int deleteById(Long id){
        return getBaseMapper().deleteById(id);
    }
}